home *** CD-ROM | disk | FTP | other *** search
- PRINTER DRIVER GENERATOR
-
- FOR
-
- FIRST WORD PLUS
-
- Version 1.00
-
-
- Introduction
-
- The Printer Driver Generator for First Word Plus is designed to
- remove the necessity for editing the rather complex hex files.
- Instead, a user-friendly program can be run to 'edit' the file, and
- "1stInstall" can be run as normal to "compile" the edited source.
-
- Limitations
-
- The current version of PDG cannot edit a loaded hex file using
- decimal characters. However, a keystroke mode is available for
- editing.
-
- Decimal mode may only be used for the initial entry of a printer
- driver. Once saved, the codes are converted into hex.
-
- The 'P' notation for placeholders described below is translated
- into the native 'high bit set' notation when a driver is saved. It
- is not translated back when a driver is loaded.
-
- Modes of Operation
-
- PDG has three basic modes of operation:
-
- 1) Configuration is used to define the six bytes of configuration
- status. This mode is different from the others since it is
- always in decimal mode.
-
- 2) Printer Characteristics is used to define the control codes to
- be sent to the printer to perform certain tasks.
-
- 3) Character Translation is used to define the subset of the
- Archimedes character set that may be sent to the printer. It
- controls whether a particular Archimedes character is to be
- ignored, sent directly to the printer, or be translated into a
- string before being output.
-
- Colour Codes
-
- To assist the majority of Archimedes owners who have a colour
- monitor, PDG uses colour throughout. The colour codes are as
- follows:
- Red - Prompt for user input
- Cyan - Output text
- Green - Default values and error messages
- Yellow - User input
-
- The Character Translation mode uses colour in a slightly different
- manner - see below.
-
- Starting the Program
-
- On starting the program, the user will be given the option of
- loading an existing printer driver hex file. If this opportunity is
- taken, a catalogue of the directory "&.1WP.hex" is displayed, and
- the user is prompted for a filename. To avoid loading a file,
- simply press the <Escape> key. If it could be found, the specified
- file is then loaded.
-
- Configuration
-
- The user is now placed in Configuration mode. Up to six questions
- will be asked. They will either warrant a Yes/No or a (decimal)
- number answer. If the prompt is '?', answer by pressing "Y" or "N".
- If the prompt is '===>' then answer by keying a decimal number and
- pressing <Return>.
-
- If any (green) value appears following the (red) prompt, then this
- is a default value. To accept it, just press <Return>.
-
- Printer Characteristics
-
- This is the most-used mode of the program. Various questions will
- be asked, all of them requiring a string response (see below). The
- only exceptions to this rule are the Yes/No questions that may or
- may not be asked. These are detailed below:
-
- "Do you want to input data in hex?"
- This is only asked if no printer driver has been previously
- loaded. If the answer is Yes, all further responses in this
- section are assumed to be in hex. If the answer is No, further
- responses are assumed to be in decimal.
-
- "Do you want to include commands for printing in NLQ?"
- This question, only asked if defining a driver for a matrix
- printer, is to save the bother of separately defining codes
- for NLQ. If the question is answered with Yes, the codes for
- NLQ will be prompted for separately. If answered with No, the
- NLQ codes will not be prompted for. Answer No if the printer
- does not support NLQ, or if the highlight codes in NLQ all
- exactly match those in draft mode.
-
- Specifying the code string
-
- This is generally done by keying a string of decimal or hex numbers
- (the top-left corner of the screen shows the current mode)
- separated by spaces.
-
- For example, the code to turn underlining on for an EPSON FX
- printer is entered in decimal as "27 45 1" and in hex as "1B 2D 1".
- However, the printer manual may well list this sequence as
- "Esc '-' 1".
-
- Fortunately, PDG does provide another way of specifying the code
- string. For printable characters (and most non-printable charac-
- ters, but not escape) it is quite easy. Simply press the single
- quote key "'" and then press the required key. The second keystroke
- made will be converted into the relevant ASCII code, and displayed
- in either hex or decimal, according to the current setting. It is
- not necessary to enter the close quote. So, in decimal mode,
- "27 45 1" may be entered as "27 '- 1".
-
- In other respects, entering a code string is similar to entering
- the configuration options as above, in that the green default
- property occurs here also. Note however that if a code is to be
- removed from the printer driver, and a default is given, pressing
- <Return> will accept the default. To cancel the default, press
- <Space> before <Return>.
-
- Using placeholders
-
- Certain commands (for example vertical tab) require the use of a
- placeholder. A placeholder byte signifies the position in which
- First Word Plus will insert a numeric value in the command string.
- However, many printers will not accept a simple value counting from
- zero (as 1st Word Plus wishes to output), so the facility exists to
- force 1st Word Plus to add a constant to the numeric value before
- output. Typically, a printer will require 1st Word Plus to add
- either 1, 0 or 32 (to make the command argument a printable
- character).
-
- To insert a placeholder, simply type 'P' in the command string. To
- force 1st Word Plus to add 1 use 'P1'. To add 32 use 'P32' in
- decimal mode, or 'P20' in hex mode.
-
- Since placeholders are internally stored by '1stInstall' as bytes
- with the high bit set, when editing an existing file, 'P' will
- appear as '80', 'P1' as '81' and 'P32'/'P20' as 'A0'. Thus any
- character value of greater than hex 7F is treated as a placeholder.
-
- The commands that require placeholders are indicated by the suffix
- '[P]' in the prompt.
-
-
- Changing Character Translations
-
- Once the last characteristic has been entered, the program goes
- into character translation mode. A matrix of Archimedes characters
- is displayed, and the mouse pointer appears.
-
- If a character is displayed in the matrix in yellow, it will be
- sent directly to the printer. If it is displayed in red, it will be
- ignored at print time. If it is displayed in green, then there is a
- character translation string set up for that character.
-
- To change the colour of a character in the matrix (and hence it's
- printer availability), point to it with the mouse, and press the
- relevant button: Select for yellow, Menu for green, and Adjust for
- Red.
-
- When defining character translations using the menu button, the
- same method is used for input as in defining configuration strings
- above.
-
- Once the character matrix is defined, move the mouse pointer to the
- magenta word "End" at position 127 in the character matrix
- (character 127 - delete - cannot be redefined) and press any mouse
- button.
-
- Saving the hex file
-
- Once "End" has been selected on the character matrix, the user is
- given an opportunity to repeat the whole dialogue. If only a few
- fields were originally entered in error, then the method of
- providing the previously-entered value as a default means that the
- user can simply press <Return> to skip this question giving the
- same response as last time.
-
- This process may be repeated many times. Once the option has been
- selected to save the file, processing continues in a similar manner
- to loading a file (see above).
-
- A catalogue of "&.1WP.hex" is displayed if it is available, and the
- user is prompted for a filename. If a printer driver was previously
- loaded, it's filename will be the default. If no printer driver was
- loaded, the first word of the printer name will be used as a
- default filename. If this contains bad characters for a filename,
- ADFS will generate an error, and the user is re-prompted for a
- filename.
-
- Any Queries
-
- If you still have any queries, I will be glad to help - contact me
- via Paul Beverley of Archive.
-
-